<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:f="http://java.sun.com/jsf/core">
    <head>
        <a4j:loadStyle src="/css/default.css" />
        <title>
            Muebles Los Alpes - #{titulo}
        </title>
    </head>
    <body>
        <center>
            <table>
                <tr>
                    <td>
                        <h:graphicImage value="/img/header.jpg" />
                    </td>
                </tr>
                <tr>
                    <td>
                        <rich:panel styleClass="controlbar" style="text-align:right;">
                            <h:panelGrid columns="1">
                                <h:outputLabel value="Usted no ha iniciado sesión" rendered="#{!SecurityBean.logedIn}" />
                                <h:form>
                                    <h:commandLink value="Bienvenido #{SecurityBean.logedUser}/" styleClass="label" rendered="#{SecurityBean.logedIn}" />
                                    <a4j:commandButton immediate="true" value="Cerrar Sesión" style="text-align:right;" action="#{SecurityBean.closeSession}" rendered="#{SecurityBean.logedIn}" />
                                </h:form>
                            </h:panelGrid>
                        </rich:panel>

                    </td>
                </tr>
                <tr>
                    <td>
                        <rich:panel>
                            <center>
                                #{titulo}
                            </center>
                        </rich:panel>
                    </td>
                </tr>
                <tr>
                    <td>
                        <ui:insert name="body" />
                    </td>
                </tr>
                <tr>
                    <td>
                        <h:graphicImage value="/img/bottom.jpg" />
                    </td>
                </tr>
            </table>

        </center>
    </body>
</html>

